package org.example.judge_feign_api;

import org.example.judge_common.entity.ResponseResult;
import org.example.judge_pojo.Auth;
import org.example.judge_pojo.Submit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("oj-judge")
public interface JudgeClient {
    @PostMapping(value = "/problem/detail/{id}",headers = {"token="+ Auth.ROOT})
    ResponseResult problemDetail(@PathVariable String id);

    @PostMapping(value = "/submit/main")
    ResponseResult submit(@RequestBody Submit submit);
}
